home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / xemacs.info-13.z / xemacs.info-13
Encoding:
GNU Info File  |  1998-05-21  |  50.0 KB  |  1,221 lines

  1. This is Info file ../../info/xemacs.info, produced by Makeinfo version
  2. 1.68 from the input file xemacs.texi.
  3.  
  4.    This file documents the XEmacs editor.
  5.  
  6.    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
  7. 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
  8. Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
  9.  
  10.    Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.  
  14.    Permission is granted to copy and distribute modified versions of
  15. this manual under the conditions for verbatim copying, provided also
  16. that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
  17. General Public License" are included exactly as in the original, and
  18. provided that the entire resulting derived work is distributed under the
  19. terms of a permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that the sections entitled "The GNU Manifesto",
  24. "Distribution" and "GNU General Public License" may be included in a
  25. translation approved by the author instead of in the original English.
  26.  
  27. 
  28. File: xemacs.info,  Node: Mark and Region,  Next: General Calendar,  Prev: Scroll Calendar,  Up: Calendar/Diary
  29.  
  30. The Mark and the Region
  31. -----------------------
  32.  
  33.    The concept of the mark applies to the calendar just as to any other
  34. buffer, but it marks a *date*, not a *position* in the buffer.  The
  35. region consists of the days between the mark and point (including the
  36. starting and stopping dates).
  37.  
  38. `C-SPC'
  39.      Set the mark to today's date (`calendar-set-mark').
  40.  
  41. `C-@'
  42.      The same.
  43.  
  44. `C-x C-x'
  45.      Interchange mark and point (`calendar-exchange-point-and-mark').
  46.  
  47. `M-='
  48.      Display the number of days in the current region
  49.      (`calendar-count-days-region').
  50.  
  51.    You set the mark in the calendar, as in any other buffer, by using
  52. `C-@' or `C-SPC' (`calendar-set-mark').  You return to the marked date
  53. with the command `C-x C-x' (`calendar-exchange-point-and-mark') which
  54. puts the mark where point was and point where mark was.  The calendar
  55. is scrolled as necessary, if the marked date was not visible on the
  56. screen.  This does not change the extent of the region.
  57.  
  58.    To determine the number of days in the region, type `M-='
  59. (`calendar-count-days-region').  The numbers of days printed is
  60. *inclusive*, that is, includes the days specified by mark and point.
  61.  
  62.    The main use of the mark in the calendar is to remember dates that
  63. you may want to go back to.  To make this feature more useful, the mark
  64. ring (*note Mark Ring::.) operates exactly as in other buffers:  Emacs
  65. remembers 16 previous locations of the mark.  To return to a marked
  66. date, type `C-u C-SPC' (or `C-u C-@'); this is the command
  67. `calendar-set-mark' given a numeric argument.  It moves point to where
  68. the mark was, restores the mark from the ring of former marks, and
  69. stores the previous point at the end of the mark ring.  So, repeated
  70. use of this command moves point through all the old marks on the ring,
  71. one by one.
  72.  
  73. 
  74. File: xemacs.info,  Node: General Calendar,  Next: Holidays,  Prev: Mark and Region,  Up: Calendar/Diary
  75.  
  76. Miscellaneous Calendar Commands
  77. -------------------------------
  78.  
  79. `p d'
  80.      Display day-in-year (`calendar-print-day-of-year').
  81.  
  82. `?'
  83.      Briefly describe calendar commands (`describe-calendar-mode').
  84.  
  85. `SPC'
  86.      Scroll the next window (`scroll-other-window').
  87.  
  88. `C-c C-l'
  89.      Regenerate the calendar window (`redraw-calendar').
  90.  
  91. `q'
  92.      Exit from calendar (`exit-calendar').
  93.  
  94.    If you want to know how many days have elapsed since the start of
  95. the year, or the number of days remaining in the year, type the `p d'
  96. command (`calendar-print-day-of-year').  This displays both of those
  97. numbers in the echo area.
  98.  
  99.    To display a brief description of the calendar commands, type `?'
  100. (`describe-calendar-mode').  For a fuller description, type `C-h m'.
  101.  
  102.    You can use `SPC' (`scroll-other-window') to scroll the other
  103. window.  This is handy when you display a list of holidays or diary
  104. entries in another window.
  105.  
  106.    If the calendar window gets corrupted, type `C-c C-l'
  107. (`redraw-calendar') to redraw it.
  108.  
  109.    To exit from the calendar, type `q' (`exit-calendar').  This buries
  110. all buffers related to the calendar and returns the window display to
  111. what it was when you entered the calendar.
  112.  
  113. 
  114. File: xemacs.info,  Node: Holidays,  Next: Sunrise/Sunset,  Prev: General Calendar,  Up: Calendar/Diary
  115.  
  116. Holidays
  117. --------
  118.  
  119.    The Emacs calendar knows about all major and many minor holidays.
  120.  
  121. `h'
  122.      Display holidays for the date indicated by point
  123.      (`calendar-cursor-holidays').
  124.  
  125. `x'
  126.      Mark holidays in the calendar window (`mark-calendar-holidays').
  127.  
  128. `u'
  129.      Unmark calendar window (`calendar-unmark').
  130.  
  131. `a'
  132.      List all holidays for the displayed three months in another window
  133.      (`list-calendar-holidays').
  134.  
  135. `M-x holidays'
  136.      List all holidays for three months around today's date in another
  137.      window.
  138.  
  139.    To see if any holidays fall on a given date, position point on that
  140. date in the calendar window and use the `h' command.  The holidays are
  141. usually listed in the echo area, but if there are too many to fit in
  142. one line, then they are displayed in a separate window.
  143.  
  144.    To find the distribution of holidays for a wider period, you can use
  145. the `x' command.  This places a `*' next to every date on which a
  146. holiday falls.  The command applies both to the currently visible dates
  147. and to new dates that become visible by scrolling.  To turn marking off
  148. and erase the current marks, type `u', which also erases any diary
  149. marks (*note Diary::.).
  150.  
  151.    To get even more detailed information, use the `a' command, which
  152. displays a separate buffer containing a list of all holidays in the
  153. current three-month range.
  154.  
  155.    You can display the list of holidays for the current month and the
  156. preceding and succeeding months even if you don't have a calendar
  157. window.  Use the command `M-x holidays'.  If you want the list of
  158. holidays centered around a different month, use `C-u M-x holidays' and
  159. type the month and year.
  160.  
  161.    The holidays known to Emacs include American holidays and the major
  162. Christian, Jewish, and Islamic holidays; when floating point is
  163. available, Emacs also knows about solstices and equinoxes.  The dates
  164. used by Emacs for holidays are based on *current practice*, not
  165. historical fact.  Historically, for instance, the start of daylight
  166. savings time and even its existence have varied from year to year.
  167. However present American law mandates that daylight savings time begins
  168. on the first Sunday in April; this is the definition that Emacs uses,
  169. even though it is wrong for some prior years.
  170.  
  171. 
  172. File: xemacs.info,  Node: Sunrise/Sunset,  Next: Lunar Phases,  Prev: Holidays,  Up: Calendar/Diary
  173.  
  174. Times of Sunrise and Sunset
  175. ---------------------------
  176.  
  177.    Emacs can tell you, to within a minute or two, the times of sunrise
  178. and sunset for any date, if floating point is available.
  179.  
  180. `S'
  181.      Display times of sunrise and sunset for the date indicated by point
  182.      (`calendar-sunrise-sunset').
  183.  
  184. `M-x sunrise-sunset'
  185.      Display times of sunrise and sunset for today's date.
  186.  
  187.    Move point to the date you want, and type `S', to display the *local
  188. times* of sunrise and sunset in the echo area.
  189.  
  190.    You can display the times of sunrise and sunset for the current date
  191. even if you don't have a calendar window.  Use the command `M-x
  192. sunrise-sunset'.  If you want the times of sunrise and sunset for a
  193. different date, use `C-u M-x sunrise-sunset' and type the year, month,
  194. and day.
  195.  
  196.    Because the times of sunrise and sunset depend on the location on
  197. earth, you need to tell Emacs your latitude, longitude, and location
  198. name.  Here is an example of what to set:
  199.  
  200.      (setq calendar-latitude 40.1)
  201.      (setq calendar-longitude -88.2)
  202.      (setq calendar-location-name "Urbana, IL")
  203.  
  204. Use one decimal place in the values of `calendar-latitude' and
  205. `calendar-longitude'.
  206.  
  207.    Your time zone also affects the local time of sunrise and sunset.
  208. Emacs usually gets this information from the operating system, but if
  209. these values are not what you want (or if the operating system does not
  210. supply them), you'll need to set them yourself, like this:
  211.  
  212.      (setq calendar-time-zone -360)
  213.      (setq calendar-standard-time-zone-name "CST")
  214.      (setq calendar-daylight-time-zone-name "CDT")
  215.  
  216. The value of `calendar-time-zone' is the number of minutes difference
  217. between your local standard time and Universal Time (Greenwich time).
  218. The values of `calendar-standard-time-zone-name' and
  219. `calendar-daylight-time-zone-name' are the abbreviations used in your
  220. time zone.
  221.  
  222.    Emacs displays the times of sunrise and sunset *corrected for
  223. daylight savings time* (this convenience is unusual; most tables of
  224. sunrise and sunset use standard time).  The default rule for the
  225. starting and stopping dates of daylight savings time is the American
  226. rule.  *Note Daylight Savings::
  227.  
  228.    You can display the times of sunrise and sunset for any location and
  229. any date with `C-u C-u M-x sunrise-sunset'.  Emacs asks you for a
  230. longitude, latitude, number of minutes difference from Universal time,
  231. and date, and then tells you the times of sunrise and sunset for that
  232. location on that date.  The times are usually given in the echo area,
  233. but if the message is too long fit in one line, they are displayed in a
  234. separate window.
  235.  
  236. 
  237. File: xemacs.info,  Node: Lunar Phases,  Next: Other Calendars,  Prev: Sunrise/Sunset,  Up: Calendar/Diary
  238.  
  239. Phases of the Moon
  240. ------------------
  241.  
  242.    Emacs can tell you the dates and times of the phases of the moon (new
  243. moon, first quarter, full moon, last quarter), if floating point is
  244. available.
  245.  
  246. `M'
  247.      List, in another window, the dates and times for all the quarters
  248.      of the moon for the three-month period shown in the calendar window
  249.      (`calendar-phases-of-moon').
  250.  
  251. `M-x phases-of-moon'
  252.      List dates and times of the quarters of the moon for three months
  253.      around today's date in another window.
  254.  
  255.    Use the `M' command to display a separate buffer of the phases of
  256. the moon for the current three-month range.  The dates and times listed
  257. are accurate to within a few minutes.
  258.  
  259.    You can display the list of the phases of the moon for the current
  260. month and the preceding and succeeding months even if you don't have a
  261. calendar window.  Use the command `M-x phases-of-moon'.  If you want
  262. the phases of the moon centered around a different month, use `C-u M-x
  263. phases-of-moon' and type the month and year.
  264.  
  265.    The dates and times given for the phases of the moon are given in
  266. local time (corrected for daylight savings, when appropriate); but if
  267. the variable `calendar-time-zone' is void, Universal Time (the
  268. Greenwich time zone) is used.  *Note Daylight Savings::
  269.  
  270. 
  271. File: xemacs.info,  Node: Other Calendars,  Next: Diary,  Prev: Lunar Phases,  Up: Calendar/Diary
  272.  
  273. Our Calendar and Other Calendars
  274. --------------------------------
  275.  
  276.    The Emacs calendar displayed is *always* the Gregorian calendar,
  277. sometimes called the "new style" calendar, which is used in most of the
  278. world today.  However, this calendar did not exist before the sixteenth
  279. century and was not widely used before the eighteenth century; it did
  280. not fully displace the Julian calendar and gain universal acceptance
  281. until the early twentieth century.  This poses a problem for the Emacs
  282. calendar: you can ask for the calendar of any month starting with
  283. January, year 1 of the current era, but the calendar displayed is the
  284. Gregorian, even for a date at which the Gregorian calendar did not
  285. exist!
  286.  
  287.    Emacs knows about several different calendars, though, not just the
  288. Gregorian calendar.  The following commands describe the date indicated
  289. by point in various calendar notations:
  290.  
  291. `p c'
  292.      Display ISO commercial calendar equivalent for selected day
  293.      (`calendar-print-iso-date').
  294.  
  295. `p j'
  296.      Display Julian date for selected day
  297.      (`calendar-print-julian-date').
  298.  
  299. `p a'
  300.      Display astronomical (Julian) day number for selected day
  301.      (`calendar-print-astro-day-number').
  302.  
  303. `p h'
  304.      Display Hebrew date for selected day
  305.      (`calendar-print-hebrew-date').
  306.  
  307. `p i'
  308.      Display Islamic date for selected day
  309.      (`calendar-print-islamic-date').
  310.  
  311. `p f'
  312.      Display French Revolutionary date for selected day
  313.      (`calendar-print-french-date').
  314.  
  315. `p m'
  316.      Display Mayan date for selected day (`calendar-print-mayan-date').
  317.  
  318.    If you are interested in these calendars, you can convert dates one
  319. at a time.  Put point on the desired date of the Gregorian calendar and
  320. press the appropriate keys.  The `p' is a mnemonic for "print" since
  321. Emacs "prints' the equivalent date in the echo area.
  322.  
  323.    The ISO commercial calendar is used largely in Europe.
  324.  
  325.    The Julian calendar, named after Julius Caesar, was the one used in
  326. Europe throughout medieval times, and in many countries up until the
  327. nineteenth century.
  328.  
  329.    Astronomers use a simple counting of days elapsed since noon, Monday,
  330. January 1, 4713 B.C. on the Julian calendar.  The number of days elapsed
  331. is called the *Julian day number* or the *Astronomical day number*.
  332.  
  333.    The Hebrew calendar is the one used to determine the dates of Jewish
  334. holidays.  Hebrew calendar dates begin and end at sunset.
  335.  
  336.    The Islamic (Moslem) calendar is the one used to determine the dates
  337. of Moslem holidays.  There is no universal agreement in the Islamic
  338. world about the calendar; Emacs uses a widely accepted version, but the
  339. precise dates of Islamic holidays often depend on proclamation by
  340. religious authorities, not on calculations.  As a consequence, the
  341. actual dates of occurrence can vary slightly from the dates computed by
  342. Emacs.  Islamic calendar dates begin and end at sunset.
  343.  
  344.    The French Revolutionary calendar was created by the Jacobins after
  345. the 1789 revolution, to represent a more secular and nature-based view
  346. of the annual cycle, and to install a 10-day week in a rationalization
  347. measure similar to the metric system.  The French government officially
  348. abandoned this calendar at the end of 1805.
  349.  
  350.    The Maya of Central America used three separate, overlapping calendar
  351. systems, the *long count*, the *tzolkin*, and the *haab*.  Emacs knows
  352. about all three of these calendars.  Experts dispute the exact
  353. correlation between the Mayan calendar and our calendar; Emacs uses the
  354. Goodman-Martinez-Thompson correlation in its calculations.
  355.  
  356.    You can move to dates that you specify on the Commercial, Julian,
  357. astronomical, Hebrew, Islamic, or French calendars:
  358.  
  359. `g c'
  360.      Move point to a date specified by the ISO commercial calendar
  361.      (`calendar-goto-iso-date').
  362.  
  363. `g j'
  364.      Move point to a date specified by the Julian calendar
  365.      (`calendar-goto-julian-date').
  366.  
  367. `g a'
  368.      Move point to a date specified by astronomical (Julian) day number
  369.      (`calendar-goto-astro-day-number').
  370.  
  371. `g h'
  372.      Move point to a date specified by the Hebrew calendar
  373.      (`calendar-goto-hebrew-date').
  374.  
  375. `g i'
  376.      Move point to a date specified by the Islamic calendar
  377.      (`calendar-goto-islamic-date').
  378.  
  379. `g f'
  380.      Move point to a date specified by the French Revolutionary calendar
  381.      (`calendar-goto-french-date').
  382.  
  383.    These commands ask you for a date on the other calendar, move point
  384. to the Gregorian calendar date equivalent to that date, and display the
  385. other calendar's date in the echo area.  Emacs uses strict completion
  386. (*note Completion::.) whenever it asks you to type a month name, so you
  387. don't have to worry about the spelling of Hebrew, Islamic, or French
  388. names.
  389.  
  390.    One common question concerning the Hebrew calendar is the computation
  391. of the anniversary of a date of death, called a "yahrzeit."  The Emacs
  392. calendar includes a facility for such calculations.  If you are in the
  393. calendar, the command `M-x list-yahrzeit-dates' asks you for a range of
  394. years and then displays a list of the yahrzeit dates for those years
  395. for the date given by point.  If you are not in the calendar, this
  396. command first asks you for the date of death and the range of years,
  397. and then displays the list of yahrzeit dates.
  398.  
  399.    Emacs also has many commands for movement on the Mayan calendars.
  400.  
  401. `g m l'
  402.      Move point to a date specified by the Mayan long count calendar
  403.      (`calendar-goto-mayan-long-count-date').
  404.  
  405. `g m p t'
  406.      Move point to the previous occurrence of a date specified by the
  407.      Mayan tzolkin calendar (`calendar-previous-tzolkin-date').
  408.  
  409. `g m n t'
  410.      Move point to the next occurrence of a date specified by the Mayan
  411.      tzolkin calendar (`calendar-next-tzolkin-date').
  412.  
  413. `g m p h'
  414.      Move point to the previous occurrence of a date specified by the
  415.      Mayan haab calendar (`calendar-previous-haab-date').
  416.  
  417. `g m n h'
  418.      Move point to the next occurrence of a date specified by the Mayan
  419.      haab calendar (`calendar-next-haab-date').
  420.  
  421. `g m p c'
  422.      Move point to the previous occurrence of a date specified by the
  423.      Mayan calendar round (`calendar-previous-calendar-round-date').
  424.  
  425. `g m n c'
  426.      Move point to the next occurrence of a date specified by the Mayan
  427.      calendar round (`calendar-next-calendar-round-date').
  428.  
  429.    To understand these commands, you need to understand the Mayan
  430. calendars.  The long count is a counting of days with units
  431.  
  432. 1 kin
  433.      = 1  day
  434.  
  435. 1 uinal
  436.      = 20 kin
  437.  
  438. 1 tun
  439.      = 18 uinal
  440.  
  441. 1 katun
  442.      = 20 tun
  443.  
  444. 1 baktun
  445.      = 20 katun
  446.  
  447. Thus, the long count date 12.16.11.16.6 means 12 baktun, 16 katun, 11
  448. tun, 16 uinal, and 6 kin.  The Emacs calendar can handle Mayan long
  449. count dates as early as 7.17.18.13.1, but no earlier.  When you use the
  450. `g m l' command, type the Mayan long count date with the baktun, katun,
  451. tun, uinal, and kin separated by periods.
  452.  
  453.    The Mayan tzolkin calendar is a cycle of 260 days formed by a pair of
  454. independent cycles of 13 and 20 days.  Like the haab cycle, this cycle
  455. repeats endlessly, and you can go backward and forward to the previous
  456. or next (respectively) point in the cycle.  When you type `g m p t',
  457. Emacs asks you for a tzolkin date and moves point to the previous
  458. occurrence of that date; type `g m n t' to go to the next occurrence.
  459.  
  460.    The Mayan haab calendar is a cycle of 365 days arranged as 18 months
  461. of 20 days each, followed a 5-day monthless period.  Since this cycle
  462. repeats endlessly, Emacs lets you go backward and forward to the
  463. previous or next (respectively) point in the cycle.  Type `g m p h' to
  464. go to the previous haab date; Emacs asks you for a haab date and moves
  465. point to the previous occurrence of that date.  Similarly, type `g m n
  466. h' to go to the next haab date.
  467.  
  468.    The Maya also used the combination of the tzolkin date and the haab
  469. date.  This combination is a cycle of about 52 years called a *calendar
  470. round*.  If you type `g m p c', Emacs asks you for both a haab and a
  471. tzolkin date and then moves point to the previous occurrence of that
  472. combination.  Use `g m p c' to move point to the next occurrence.
  473. Emacs signals an error if the haab/tzolkin date you have typed cannot
  474. occur.
  475.  
  476.    Emacs uses strict completion (*note Completion::.) whenever it asks
  477. you to type a Mayan name, so you don't have to worry about spelling.
  478.  
  479. 
  480. File: xemacs.info,  Node: Diary,  Next: Calendar Customization,  Prev: Other Calendars,  Up: Calendar/Diary
  481.  
  482. The Diary
  483. ---------
  484.  
  485.    Associated with the Emacs calendar is a diary that keeps track of
  486. appointments or other events on a daily basis.  To use the diary
  487. feature, you must first create a "diary file" containing a list of
  488. events and their dates.  Then Emacs can automatically pick out and
  489. display the events for today, for the immediate future, or for any
  490. specified date.
  491.  
  492.    By default, Emacs expects your diary file to be named `~/diary'.  It
  493. uses the same format as the `calendar' utility.  A sample `~/diary'
  494. file is:
  495.  
  496.      12/22/1988 Twentieth wedding anniversary!!
  497.      &1/1. Happy New Year!
  498.      10/22 Ruth's birthday.
  499.      * 21, *: Payday
  500.      Tuesday--weekly meeting with grad students at 10am
  501.               Supowit, Shen, Bitner, and Kapoor to attend.
  502.      1/13/89 Friday the thirteenth!!
  503.      &thu 4pm squash game with Lloyd.
  504.      mar 16 Dad's birthday
  505.      April 15, 1989 Income tax due.
  506.      &* 15 time cards due.
  507.  
  508.    Although you probably will start by creating a diary manually, Emacs
  509. provides a number of commands to let you view, add, and change diary
  510. entries.  You can also share diary entries with other users (*note
  511. Included Diary Files::.).
  512.  
  513. * Menu:
  514.  
  515. * Diary Commands::         Viewing diary entries and associated calendar dates.
  516. * Format of Diary File::   Entering events in your diary.
  517. * Special Diary Entries::  Anniversaries, blocks of dates, cyclic entries, etc.
  518.  
  519. 
  520. File: xemacs.info,  Node: Diary Commands,  Next: Format of Diary File,  Prev: Diary,  Up: Diary
  521.  
  522. Commands Displaying Diary Entries
  523. ---------------------------------
  524.  
  525.    Once you have created a `~/diary' file, you can view it within
  526. Calendar mode.  You can also view today's events independently of
  527. Calendar mode.
  528.  
  529. `d'
  530.      Display any diary entries for the selected date
  531.      (`view-diary-entries').
  532.  
  533. `s'
  534.      Display entire diary file (`show-all-diary-entries').
  535.  
  536. `m'
  537.      Mark all visible dates that have diary entries
  538.      (`mark-diary-entries').
  539.  
  540. `u'
  541.      Unmark calendar window (`calendar-unmark').
  542.  
  543. `M-x print-diary-entries'
  544.      Print a hard copy of the diary display as it appears.
  545.  
  546. `M-x diary'
  547.      Display any diary entries for today's date.
  548.  
  549.    Displaying the diary entries with `d' shows in a separate window the
  550. diary entries for the date indicated by point in the calendar window.
  551. The mode line of the new window shows the date of the diary entries and
  552. any holidays that fall on that date.
  553.  
  554.    If you specify a numeric argument with `d', then all the diary
  555. entries for that many successive days are shown.  Thus, `2 d' displays
  556. all the entries for the selected date and for the following day.
  557.  
  558.    To get a broader overview of which days are mentioned in the diary,
  559. use the `m' command to mark those days in the calendar window.  The
  560. marks appear next to the dates to which they apply.  The `m' command
  561. affects the dates currently visible and, if you scroll the calendar,
  562. newly visible dates as well.  The `u' command deletes all diary marks
  563. (and all holiday marks too; *note Holidays::.), not only in the dates
  564. currently visible, but dates that become visible when you scroll the
  565. calendar.
  566.  
  567.    For more detailed information, use the `s' command, which displays
  568. the entire diary file.
  569.  
  570.    Display of selected diary entries uses the selective display feature,
  571. the same feature that Outline mode uses to show part of an outline
  572. (*note Outline Mode::.).  This involves hiding the diary entries that
  573. are not relevant, by changing the preceding newline into an ASCII
  574. control-m (code 015).  The hidden lines are part of the buffer's text,
  575. but they are invisible; they don't appear on the screen.  When you save
  576. the diary file, the control-m characters are saved as newlines; thus,
  577. the invisible lines become ordinary lines in the file.
  578.  
  579.    Because the diary buffer as you see it is an illusion, simply
  580. printing the contents does not print what you see on your screen.  So
  581. there is a special command to print a hard copy of the buffer *as it
  582. appears*; this command is `M-x print-diary-entries'.  It sends the data
  583. directly to the printer.  You can customize it like `lpr-region' (*note
  584. Hardcopy::.).
  585.  
  586.    The command `M-x diary' displays the diary entries for the current
  587. date, independently of the calendar display, and optionally for the next
  588. few days as well; the variable `number-of-diary-entries' specifies how
  589. many days to include (*note Customization::.).
  590.  
  591.    If you put in your `.emacs' file:
  592.  
  593.      (diary)
  594.  
  595. it automatically displays a window with the day's diary entries, when
  596. you enter Emacs.  The mode line of the displayed window shows the date
  597. and any holidays that fall on that date.
  598.  
  599. 
  600. File: xemacs.info,  Node: Format of Diary File,  Next: Special Diary Entries,  Prev: Diary Commands,  Up: Diary
  601.  
  602. The Diary File
  603. --------------
  604.  
  605.    Your "diary file" is a file that records events associated with
  606. particular dates.  The name of the diary file is specified by the
  607. variable `diary-file'; `~/diary' is the default.  You can use the same
  608. file for the `calendar' utility program, since its formats are a subset
  609. of the ones allowed by the Emacs Calendar.
  610.  
  611.    Each entry in the file describes one event and consists of one or
  612. more lines.  It always begins with a date specification at the left
  613. margin.  The rest of the entry is simply text to describe the event.
  614. If the entry has more than one line, then the lines after the first
  615. must begin with whitespace to indicate they continue a previous entry.
  616.  
  617.    Here are some sample diary entries, illustrating different ways of
  618. formatting a date.  The examples all show dates in American order
  619. (month, day, year), but Calendar mode offers (day, month, year)
  620. ordering too.
  621.  
  622.      4/20/93  Switch-over to new tabulation system
  623.      apr. 25  Start tabulating annual results
  624.      4/30  Results for April are due
  625.      */25  Monthly cycle finishes
  626.      Friday  Don't leave without backing up files
  627.  
  628.    The first entry appears only once, on April 20, 1993.  The second and
  629. third appear every year on the specified dates, and the fourth uses a
  630. wildcard (asterisk) for the month, so it appears on the 25th of every
  631. month.  The final entry appears every week on Friday.
  632.  
  633.    You can also use just numbers to express a date, as in `MONTH/DAY' or
  634. `MONTH/DAY/YEAR'.  This must be followed by a nondigit.  In the date
  635. itself, MONTH and DAY are numbers of one or two digits.  YEAR is a
  636. number and may be abbreviated to the last two digits; that is, you can
  637. use `11/12/1989' or `11/12/89'.
  638.  
  639.    A date may be "generic", or partially unspecified.  Then the entry
  640. applies to all dates that match the specification.  If the date does
  641. not contain a year, it is generic and applies to any year.
  642. Alternatively, MONTH, DAY, or YEAR can be a `*'; this matches any
  643. month, day, or year, respectively.  Thus, a diary entry `3/*/*' matches
  644. any day in March of any year.
  645.  
  646.    Dates can also have the form `MONTHNAME DAY' or `MONTHNAME DAY,
  647. YEAR', where the month's name can be spelled in full or abbreviated to
  648. three characters (with or without a period).  Case is not significant.
  649. If the date does not contain a year, it is generic and applies to any
  650. year.  Also, MONTHNAME, DAY, or YEAR can be a `*' which matches any
  651. month, day, or year, respectively.
  652.  
  653.    If you prefer the European style of writing dates--in which the day
  654. comes before the month--type `M-x european-calendar' while in the
  655. calendar, or set the variable `european-calendar-style' to `t' in your
  656. `.emacs' file *before* the calendar or diary command.  This mode
  657. interprets all dates in the diary in the European manner, and also uses
  658. European style for displaying diary dates.  (Note that there is no
  659. comma after the MONTHNAME in the European style.)
  660.  
  661.    To revert to the (default) American style of writing dates, type `M-x
  662. american-calendar'.
  663.  
  664.    You can use the name of a day of the week as a generic date which
  665. applies to any date falling on that day of the week.  You can abbreviate
  666. the day of the week to three letters (with or without a period) or spell
  667. it in full; it need not be capitalized.
  668.  
  669.    You can inhibit the marking of certain diary entries in the calendar
  670. window; to do this, insert an ampersand (`&') at the beginning of the
  671. entry, before the date.  This has no effect on display of the entry in
  672. the diary window; it affects only marks on dates in the calendar
  673. window.  Nonmarking entries are especially useful for generic entries
  674. that would otherwise mark many different dates.
  675.  
  676.    Lines that do not begin with valid dates and do not continue a
  677. preceding entry are ignored.
  678.  
  679.    If the first line of a diary entry consists only of the date or day
  680. name with no following blanks or punctuation, then the diary window
  681. display doesn't include that line; only the continuation lines appear.
  682. For example:
  683.  
  684.      02/11/1989
  685.            Bill B. visits Princeton today
  686.            2pm Cognitive Studies Committee meeting
  687.            2:30-5:30 Liz at Lawrenceville
  688.            4:00pm Dentist appt
  689.            7:30pm Dinner at George's
  690.            8:00-10:00pm concert
  691.  
  692. appears in the diary window without the date line at the beginning.
  693. This style of entry looks neater when you display just a single day's
  694. entries, but can cause confusion if you ask for more than one day's
  695. entries.
  696.  
  697.    You can edit the diary entries as they appear in the window, but it
  698. is important to remember that the buffer displayed contains the *entire*
  699. diary file, with portions of it concealed from view.  This means, for
  700. instance, that the `C-f' (`forward-char') command can put point at what
  701. appears to be the end of the line, but what is in reality the middle of
  702. some concealed line.  *Be careful when editing the diary entries!*
  703. Inserting additional lines or adding/deleting characters in the middle
  704. of a visible line cannot cause problems.  Watch out for `C-e'
  705. (`end-of-line'), however; it may put you at the end of a concealed line
  706. far from where point appears to be!  Before editing the diary, it is
  707. best to display the entire file with `s' (`show-all-diary-entries').
  708.  
  709.    While in the calendar, there are several commands to help you in
  710. making entries to your diary.
  711.  
  712. `i d'
  713.      Add a diary entry for the selected date (`insert-diary-entry').
  714.  
  715. `i w'
  716.      Add a diary entry for the selected day of the week
  717.      (`insert-weekly-diary-entry').
  718.  
  719. `i m'
  720.      Add a diary entry for the selected day of the month
  721.      (`insert-monthly-diary-entry').
  722.  
  723. `i y'
  724.      Add a diary entry for the selected day of the year
  725.      (`insert-yearly-diary-entry').
  726.  
  727.    You can make a diary entry for a specific date by moving point to
  728. that date in the calendar window and using the `i d' command.  This
  729. command displays the end of your diary file in another window and
  730. inserts the date; you can then type the rest of the diary entry.
  731.  
  732.    If you want to make a diary entry that applies to a specific day of
  733. the week, move point to that day of the week (any occurrence will do)
  734. and use the `i w' command.  This displays the end of your diary file in
  735. another window and inserts the day-of-week as a generic date; you can
  736. then type the rest of the diary entry.
  737.  
  738.    You make a monthly diary entry in the same fashion.  Move point to
  739. the day of the month, use the `i m' command, and type the diary entry.
  740. Similarly, you make a yearly diary entry with the `i y' command.
  741.  
  742.    All of the above commands make marking diary entries.  If you want
  743. the diary entry to be nonmarking, give a prefix argument to the
  744. command.  For example, `C-u i w' makes a nonmarking, weekly diary entry.
  745.  
  746.    If you modify the diary, be sure to write the file before exiting
  747. from the calendar.
  748.  
  749. 
  750. File: xemacs.info,  Node: Special Diary Entries,  Prev: Format of Diary File,  Up: Diary
  751.  
  752. Special Diary Entries
  753. ---------------------
  754.  
  755.    In addition to entries based on calendar dates, your diary file can
  756. contain entries for regularly occurring events such as anniversaries.
  757. These entries are based on expressions (sexps) that Emacs evaluates as
  758. it scans the diary file.  Such an entry is indicated by `%%' at the
  759. beginning (preceded by `&' for a nonmarking entry), followed by a sexp
  760. in parentheses.  Calendar mode offers commands to make it easier to put
  761. some of these special entries in your diary.
  762.  
  763. `i a'
  764.      Add an anniversary diary entry for the selected date
  765.      (`insert-anniversary-diary-entry').
  766.  
  767. `i b'
  768.      Add a block diary entry for the current region
  769.      (`insert-block-diary-entry').
  770.  
  771. `i c'
  772.      Add a cyclic diary entry starting at the date
  773.      (`insert-cyclic-diary-entry').
  774.  
  775.    If you want to make a diary entry that applies to the anniversary of
  776. a specific date, move point to that date and use the `i a' command.
  777. This displays the end of your diary file in another window and inserts
  778. the anniversary description; you can then type the rest of the diary
  779. entry.
  780.  
  781.    The effect of `i a' is to add a `diary-anniversary' sexp to your
  782. diary file.  You can also add one manually, for instance:
  783.  
  784.      %%(diary-anniversary 10 31 1948) Arthur's birthday
  785.  
  786. This entry applies to October 31 in any year after 1948; `10 31 1948'
  787. specifies the date.  (If you are using the European calendar style, the
  788. month and day are interchanged.)  The reason this sexp requires a
  789. beginning year is that advanced diary functions can use it to calculate
  790. the number of elapsed years (*note Sexp Diary Entries::.).
  791.  
  792.    You can make a diary entry for a block of dates by setting the mark
  793. at the date at one end of the block, moving point to the date at the
  794. other end of the block, and using the `i b' command.  This command
  795. causes the end of your diary file to be displayed in another window and
  796. the block description to be inserted; you can then type the diary entry.
  797.  
  798.    Here is such a diary entry that applies to all dates from June 24,
  799. 1990 through July 10, 1990:
  800.  
  801.      %%(diary-block 6 24 1990 7 10 1990) Vacation
  802.  
  803. The `6 24 1990' indicates the starting date and the `7 10 1990'
  804. indicates the stopping date.  (Again, if you are using the European
  805. calendar style, the month and day are interchanged.)
  806.  
  807.    You can specify cyclic diary entries that repeat after a fixed
  808. interval of days.  Move point to the starting date and use the `i c'
  809. command.  After you specify the length of interval, this command
  810. displays the end of your diary file in another window and inserts the
  811. cyclic event description; you can then type the rest of the diary entry.
  812.  
  813.    The sexp corresponding to the `i c' command looks like:
  814.  
  815.      %%(diary-cyclic 50 3 1 1990) Renew medication
  816.  
  817. which applies to March 1, 1990 and every 50th day following; `3 1 1990'
  818. specifies the starting date.  (If you are using the European calendar
  819. style, the month and day are interchanged.)
  820.  
  821.    All three of the these commands make marking diary entries.  If you
  822. want the diary entry to be nonmarking, give a numeric argument to the
  823. command.  For example, `C-u i a' makes a nonmarking anniversary diary
  824. entry.
  825.  
  826.    Marking sexp diary entries in the calendar is *extremely*
  827. time-consuming, since every date visible in the calendar window must be
  828. individually checked.  So it's a good idea to make sexp diary entries
  829. nonmarking with `&'.
  830.  
  831.    One sophisticated kind of sexp, a floating diary entry, has no
  832. corresponding command.  The floating diary entry specifies a
  833. regularly-occurring event by offsets specified in days, weeks, and
  834. months.  It is comparable to a crontab entry interpreted by the `cron'
  835. utility on Unix systems.
  836.  
  837.    Here is a nonmarking, floating diary entry that applies to the last
  838. Thursday in November:
  839.  
  840.      &%%(diary-float 11 4 -1) American Thanksgiving
  841.  
  842. The 11 specifies November (the eleventh month), the 4 specifies Thursday
  843. (the fourth day of the week, where Sunday is numbered zero), and the -1
  844. specifies "last" (1 would mean "first", 2 would mean "second", -2 would
  845. mean "second-to-last", and so on).  The month can be a single month or
  846. a list of months.  Thus you could change the 11 above to `'(1 2 3)' and
  847. have the entry apply to the last Thursday of January, February, and
  848. March.  If the month is `t', the entry applies to all months of the
  849. year.
  850.  
  851.    The sexp feature of the diary allows you to specify diary entries
  852. based on any Emacs Lisp expression.  You can use the library of built-in
  853. functions or you can write your own functions.  The built-in functions
  854. include the ones shown in this section, plus a few others (*note Sexp
  855. Diary Entries::.).
  856.  
  857.    The generality of sexps lets you specify any diary entry that you can
  858. describe algorithmically.  Suppose you get paid on the 21st of the month
  859. if it is a weekday, and to the Friday before if the 21st is on a
  860. weekend.  The diary entry
  861.  
  862.      &%%(let ((dayname (calendar-day-of-week date))
  863.               (day (car (cdr date))))
  864.            (or (and (= day 21) (memq dayname '(1 2 3 4 5)))
  865.                (and (memq day '(19 20)) (= dayname 5)))
  866.               ) Pay check deposited
  867.  
  868. to just those dates.  This example illustrates how the sexp can depend
  869. on the variable `date'; this variable is a list (MONTH DAY YEAR) that
  870. gives the Gregorian date for which the diary entries are being found.
  871. If the value of the sexp is `t', the entry applies to that date.  If
  872. the sexp evaluates to `nil', the entry does *not* apply to that date.
  873.  
  874. 
  875. File: xemacs.info,  Node: Calendar Customization,  Prev: Diary,  Up: Calendar/Diary
  876.  
  877. Customizing the Calendar and Diary
  878. ----------------------------------
  879.  
  880.    There are many customizations that you can use to make the calendar
  881. and diary suit your personal tastes.
  882.  
  883. * Menu:
  884.  
  885. * Calendar Customizing::   Defaults you can set.
  886. * Holiday Customizing::    Defining your own holidays.
  887. * Date Display Format::    Changing the format.
  888. * Time Display Format::    Changing the format.
  889. * Daylight Savings::       Changing the default.
  890. * Diary Customizing::      Defaults you can set.
  891. * Hebrew/Islamic Entries:: How to obtain them.
  892. * Fancy Diary Display::    Enhancing the diary display, sorting entries.
  893. * Included Diary Files::   Sharing a common diary file.
  894. * Sexp Diary Entries::     Fancy things you can do.
  895. * Appt Customizing::       Customizing appointment reminders.
  896.  
  897. 
  898. File: xemacs.info,  Node: Calendar Customizing,  Next: Holiday Customizing,  Up: Calendar Customization
  899.  
  900. Customizing the Calendar
  901. ........................
  902.  
  903.    If you set the variable `view-diary-entries-initially' to `t',
  904. calling up the calendar automatically displays the diary entries for
  905. the current date as well.  The diary dates appear only if the current
  906. date is visible.  If you add both of the following lines to your
  907. `.emacs' file:
  908.  
  909.      (setq view-diary-entries-initially t)
  910.      (calendar)
  911.  
  912. they display both the calendar and diary windows whenever you start
  913. Emacs.
  914.  
  915.    Similarly, if you set the variable
  916. `view-calendar-holidays-initially' to `t', entering the calendar
  917. automatically displays a list of holidays for the current three month
  918. period.  The holiday list appears in a separate window.
  919.  
  920.    You can set the variable `mark-diary-entries-in-calendar' to `t' in
  921. order to place a plus sign (`+') beside any dates with diary entries.
  922. Whenever the calendar window is displayed or redisplayed, the diary
  923. entries are automatically marked for holidays.
  924.  
  925.    Similarly, setting the variable `mark-holidays-in-calendar' to `t'
  926. places an asterisk (`*') after all holiday dates visible in the
  927. calendar window.
  928.  
  929.    There are many customizations that you can make with the hooks
  930. provided.  For example, the variable `calendar-load-hook', whose
  931. default value is `nil', is a normal hook run when the calendar package
  932. is first loaded (before actually starting to display the calendar).
  933.  
  934.    The variable `initial-calendar-window-hook', whose default value is
  935. `nil', is a normal hook run the first time the calendar window is
  936. displayed.  The function is invoked only when you first enter Calendar
  937. mode, not when you redisplay an existing Calendar window.  But if you
  938. leave the calendar with the `q' command and reenter it, the hook runs
  939. again.
  940.  
  941.    The variable `today-visible-calendar-hook', whose default value is
  942. `nil', is a normal hook run after the calendar buffer has been prepared
  943. with the calendar when the current date is visible in the window.  One
  944. use of this hook is to replace today's date with asterisks; a function
  945. `calendar-star-date' is included for this purpose.  In your `.emacs'
  946. file, put:
  947.  
  948.      (setq today-visible-calendar-hook 'calendar-star-date)
  949.  
  950. Another standard hook function adds asterisks around the current date.
  951. Here's how to use it:
  952.  
  953.      (setq today-visible-calendar-hook 'calendar-mark-today)
  954.  
  955. A corresponding variable, `today-invisible-calendar-hook', whose
  956. default value is `nil', is a normal hook run after the calendar buffer
  957. text has been prepared, if the current date is *not* visible in the
  958. window.
  959.  
  960. 
  961. File: xemacs.info,  Node: Holiday Customizing,  Next: Date Display Format,  Prev: Calendar Customizing,  Up: Calendar Customization
  962.  
  963. Customizing the Holidays
  964. ........................
  965.  
  966.    Emacs knows about holidays defined by entries on one of several
  967. lists.  You can customize theses lists of holidays to your own needs,
  968. adding holidays or deleting lists of holidays.  The lists of holidays
  969. that Emacs uses are for general holidays (`general-holidays'), local
  970. holidays (`local-holidays'), Christian holidays (`christian-holidays'),
  971. Hebrew (Jewish) holidays (`hebrew-holidays'), Islamic (Moslem) holidays
  972. (`islamic-holidays'), and other holidays (`other-holidays').
  973.  
  974.    The general holidays are, by default, holidays common throughout the
  975. United States.  To eliminate these holidays, set `general-holidays' to
  976. `nil'.
  977.  
  978.    There are no default local holidays (but sites may supply some).  You
  979. can set the variable `local-holidays' to any list of holidays, as
  980. described below.
  981.  
  982.    By default, Emacs does not consider all the holidays of these
  983. religions, only those commonly found in secular calendars.  For a more
  984. extensive collection of religious holidays, you can set any (or all) of
  985. the variables `all-christian-calendar-holidays',
  986. `all-hebrew-calendar-holidays', or `all-islamic-calendar-holidays' to
  987. `t'.  If you want to eliminate the religious holidays, set any or all
  988. of the corresponding variables `christian-holidays', `hebrew-holidays',
  989. and `islamic-holidays' to `nil'.
  990.  
  991.    You can set the variable `other-holidays' to any list of holidays.
  992. This list, normally empty, is intended for your use.
  993.  
  994.    Each of the lists (`general-holidays', `local-holidays',
  995. `christian-holidays', `hebrew-holidays', `islamic-holidays', and
  996. `other-holidays') is a list of "holiday forms", each holiday form
  997. describing a holiday (or sometimes a list of holidays).  Holiday forms
  998. may have the following formats:
  999.  
  1000. `(holiday-fixed MONTH DAY STRING)'
  1001.      A fixed date on the Gregorian calendar.  MONTH and DAY are
  1002.      numbers, STRING is the name of the holiday.
  1003.  
  1004. `(holiday-float MONTH DAYNAME K STRING)'
  1005.      The Kth DAYNAME in MONTH on the Gregorian calendar (DAYNAME=0 for
  1006.      Sunday, and so on); negative K means count back from the end of
  1007.      the month.  STRING is the name of the holiday.
  1008.  
  1009. `(holiday-hebrew MONTH DAY STRING)'
  1010.      A fixed date on the Hebrew calendar.  MONTH and DAY are numbers,
  1011.      STRING is the name of the holiday.
  1012.  
  1013. `(holiday-islamic MONTH DAY STRING)'
  1014.      A fixed date on the Islamic calendar.  MONTH and DAY are numbers,
  1015.      STRING is the name of the holiday.
  1016.  
  1017. `(holiday-julian MONTH DAY STRING)'
  1018.      A fixed date on the Julian calendar.  MONTH and DAY are numbers,
  1019.      STRING is the name of the holiday.
  1020.  
  1021. `(holiday-sexp SEXP STRING)'
  1022.      SEXP is a Lisp expression that should use the variable `year' to
  1023.      compute the date of a holiday, or `nil' if the holiday doesn't
  1024.      happen this year.  The value represents the date as a list of the
  1025.      form `(MONTH DAY YEAR)'.  STRING is the name of the holiday.
  1026.  
  1027. `(if BOOLEAN HOLIDAY-FORM &optional HOLIDAY-FORM)'
  1028.      A choice between two holidays based on the value of BOOLEAN.
  1029.  
  1030. `(FUNCTION &optional ARGS)'
  1031.      Dates requiring special computation; ARGS, if any, are passed in a
  1032.      list to the function `calendar-holiday-function-FUNCTION'.
  1033.  
  1034.    For example, suppose you want to add Bastille Day, celebrated in
  1035. France on July 14.  You can do this by adding the following line to
  1036. your `.emacs' file:
  1037.  
  1038.      (setq other-holidays '((holiday-fixed 7 14 "Bastille Day")))
  1039.  
  1040. The holiday form `(holiday-fixed 7 14 "Bastille Day")' specifies the
  1041. fourteenth day of the seventh month (July).
  1042.  
  1043.    Many holidays occur on a specific day of the week, at a specific time
  1044. of month.  Here is a holiday form describing Hurricane Supplication Day,
  1045. celebrated in the Virgin Islands on the fourth Monday in August:
  1046.  
  1047.      (holiday-float 8 1 4 "Hurricane Supplication Day")
  1048.  
  1049. Here the 8 specifies August, the 1 specifies Monday (Sunday is 0,
  1050. Tuesday is 2, and so on), and the 4 specifies the fourth occurrence in
  1051. the month (1 specifies the first occurrence, 2 the second occurrence,
  1052. -1 the last occurrence, -2 the second-to-last occurrence, and so on).
  1053.  
  1054.    You can specify holidays that occur on fixed days of the Hebrew,
  1055. Islamic, and Julian calendars too.  For example,
  1056.  
  1057.      (setq other-holidays
  1058.            '((holiday-hebrew 10 2 "Last day of Hanukkah")
  1059.              (holiday-islamic 3 12 "Mohammed's Birthday")
  1060.              (holiday-julian 4 2 "Jefferson's Birthday")))
  1061.  
  1062. adds the last day of Hanukkah (since the Hebrew months are numbered with
  1063. 1 starting from Nisan), the Islamic feast celebrating Mohammed's
  1064. birthday (since the Islamic months are numbered from 1 starting with
  1065. Muharram), and Thomas Jefferson's birthday, which is 2 April 1743 on the
  1066. Julian calendar.
  1067.  
  1068.    To include a holiday conditionally, use either the `if' or the
  1069. `sexp' form.  For example, American presidential elections occur on the
  1070. first Tuesday after the first Monday in November of years divisible by
  1071. 4:
  1072.  
  1073.      (holiday-sexp (if (= 0 (% year 4))
  1074.                         (calendar-gregorian-from-absolute
  1075.                       (1+ (calendar-dayname-on-or-before
  1076.                             1 (+ 6 (calendar-absolute-from-gregorian
  1077.                                      (list 11 1 year))))))
  1078.                    "US Presidential Election"))
  1079.  
  1080. or
  1081.  
  1082.      (if (= 0 (% displayed-year 4))
  1083.          (fixed 11
  1084.                 (extract-calendar-day
  1085.                   (calendar-gregorian-from-absolute
  1086.                     (1+ (calendar-dayname-on-or-before
  1087.                           1 (+ 6 (calendar-absolute-from-gregorian
  1088.                                    (list 11 1 displayed-year)))))))
  1089.                 "US Presidential Election"))
  1090.  
  1091.    Some holidays just don't fit into any of these forms because special
  1092. calculations are involved in their determination.  In such cases you
  1093. must write a Lisp function to do the calculation.  To include eclipses
  1094. of the sun, for example, add `(eclipses)' to `other-holidays' and write
  1095. an Emacs Lisp function `eclipses' that returns a (possibly empty) list
  1096. of the relevant Gregorian dates among the range visible in the calendar
  1097. window, with descriptive strings, like this:
  1098.  
  1099.      (((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... )
  1100.  
  1101. 
  1102. File: xemacs.info,  Node: Date Display Format,  Next: Time Display Format,  Prev: Holiday Customizing,  Up: Calendar Customization
  1103.  
  1104. Date Display Format
  1105. ...................
  1106.  
  1107.    You can customize the manner of displaying dates in the diary, in
  1108. mode lines, and in messages by setting `calendar-date-display-form'.
  1109. This variable is a list of expressions that can involve the variables
  1110. `month', `day', and `year', all numbers in string form, and `monthname'
  1111. and `dayname', both alphabetic strings.  In the American style, the
  1112. default value of this list is as follows:
  1113.  
  1114.      ((if dayname (concat dayname ", ")) monthname " " day ", " year)
  1115.  
  1116. while in the European style this value is the default:
  1117.  
  1118.      ((if dayname (concat dayname ", ")) day " " monthname " " year)
  1119.  
  1120.    The ISO standard date representation is this:
  1121.  
  1122.      (year "-" month "-" day)
  1123.  
  1124. This specifies a typical American format:
  1125.  
  1126.      (month "/" day "/" (substring year -2))
  1127.  
  1128. 
  1129. File: xemacs.info,  Node: Time Display Format,  Next: Daylight Savings,  Prev: Date Display Format,  Up: Calendar Customization
  1130.  
  1131. Time Display Format
  1132. ...................
  1133.  
  1134.    In the calendar, diary, and related buffers, Emacs displays times of
  1135. day in the conventional American style with the hours from 1 through 12,
  1136. minutes, and either `am' or `pm'.  If you prefer the "military"
  1137. (European) style of writing times--in which the hours go from 00 to
  1138. 23--you can alter the variable `calendar-time-display-form'.  This
  1139. variable is a list of expressions that can involve the variables
  1140. `12-hours', `24-hours', and `minutes', all numbers in string form, and
  1141. `am-pm' and `time-zone', both alphabetic strings.  The default
  1142. definition of `calendar-time-display-form' is as follows:
  1143.  
  1144.      (12-hours ":" minutes am-pm
  1145.                (if time-zone " (") time-zone (if time-zone ")"))
  1146.  
  1147.    Setting `calendar-time-display-form' to
  1148.  
  1149.      (24-hours ":" minutes
  1150.                (if time-zone " (") time-zone (if time-zone ")"))
  1151.  
  1152. gives military-style times like `21:07 (UT)' if time zone names are
  1153. defined, and times like `21:07' if they are not.
  1154.  
  1155. 
  1156. File: xemacs.info,  Node: Daylight Savings,  Next: Diary Customizing,  Prev: Time Display Format,  Up: Calendar Customization
  1157.  
  1158. Daylight Savings Time
  1159. .....................
  1160.  
  1161.    Emacs understands the difference between standard time and daylight
  1162. savings time--the times given for sunrise, sunset, solstices,
  1163. equinoxes, and the phases of the moon take that into account.  The rules
  1164. for daylight savings time vary from place to place and have also varied
  1165. historically from year to year.  To do the job properly, Emacs needs to
  1166. know which rules to use.
  1167.  
  1168.    Some operating systems keep track of the rules that apply to the
  1169. place where you are; on these systems, Emacs gets the information it
  1170. needs from the system automatically.  If some or all of this
  1171. information is missing, Emacs fills in the gaps with the rules
  1172. currently used in Cambridge, Massachusetts.  If the default choice of
  1173. rules is not appropriate for your location, you can tell Emacs the
  1174. rules to use by setting certain variables.
  1175.  
  1176.    These variables are `calendar-daylight-savings-starts' and
  1177. `calendar-daylight-savings-ends'.  Their values should be Lisp
  1178. expressions that refer to the variable `year', and evaluate to the
  1179. Gregorian date on which daylight savings time starts or (respectively)
  1180. ends, in the form of a list `(MONTH DAY YEAR)'.  The values should be
  1181. `nil' if your area does not use daylight savings time.
  1182.  
  1183.    Emacs uses these expressions to determine the starting date of
  1184. daylight savings time for the holiday list and for correcting times of
  1185. day in the solar and lunar calculations.
  1186.  
  1187.    The values for Cambridge, Massachusetts are as follows:
  1188.  
  1189.      (calendar-nth-named-day 1 0 4 year)
  1190.      (calendar-nth-named-day -1 0 10 year)
  1191.  
  1192. i.e. the first 0th day (Sunday) of the fourth month (April) in the year
  1193. specified by `year', and the last Sunday of the tenth month (October)
  1194. of that year.  If daylight savings time were changed to start on
  1195. October 1, you would set `calendar-daylight-savings-starts' to this:
  1196.  
  1197.      (list 10 1 year)
  1198.  
  1199.    For a more complex example, suppose daylight savings time begins on
  1200. the first of Nisan on the Hebrew calendar.  You would set
  1201. `calendar-daylight-savings-starts' as follows:
  1202.  
  1203.      (calendar-gregorian-from-absolute
  1204.        (calendar-absolute-from-hebrew
  1205.          (list 1 1 (+ year 3760))))
  1206.  
  1207. because Nisan is the first month in the Hebrew calendar and the Hebrew
  1208. year differs from the Gregorian year by 3760 at Nisan.
  1209.  
  1210.    If there is no daylight savings time at your location, or if you want
  1211. all times in standard time, set `calendar-daylight-savings-starts' and
  1212. `calendar-daylight-savings-ends' to `nil'.
  1213.  
  1214.    This variable specifies the difference between daylight savings time
  1215. and standard time, measured in minutes.  The value for Cambridge is 60.
  1216.  
  1217.    These variables specify is the number of minutes after midnight
  1218. local time when the transition to and from daylight savings time should
  1219. occur.  For Cambridge, both variables' values are 120.
  1220.  
  1221.